/**
 * Created by CodeTlan.
 * User: Ing. Miguel Salas
 * Date: 3/11/12
 * Time: 5:00 PM
 */
Ext.define('CT.view.categoria.Grid', {
    extend: 'Ctc.view.EditorGrid',
    alias: 'widget.gridcategoria',
    store:'Categorias',
    requires: 'Ext.ux.grid.checkcolumn.CheckColumn',
    buildColumns: function(){
        return [
            { xtype: 'rownumberer'},
            { header: 'Nombre', dataIndex: 'nombre', flex: 1, editor: { allowBlank: false }},
            { align: 'center', width: 40, renderer: this._renderEliminar, editor:{xtype:'hiddenfield'}}
        ];
    },
    _renderEliminar:function(value){
        return "<img src='img/icons/16/del.png' style='cursor:pointer'>";
    },
    initComponent:function(){
        this.callParent(arguments);
        this.store.setParams({departamento_k:this.departamento_k},true);
    }
});